'use strict';

class SessionStorage {
  static set(enterpriseId : number, employeeId : number, versionId : number, jwt : string) {
    SessionStorage.setEnterpriseId(enterpriseId);
    SessionStorage.setEmployeeId(employeeId);
    SessionStorage.setVersionId(versionId);
    SessionStorage.setJwt(jwt);
  }

  static setJwt(jwt : string) {
    sessionStorage.setItem('jwt', jwt);
  }

  static getJwt() {
    return sessionStorage.getItem('jwt');
  }

  static setEnterpriseId(enterpriseId : number) {
    sessionStorage.setItem('enterpriseId', enterpriseId);
  }

  static getEnterpriseId() {
    return sessionStorage.getItem('enterpriseId');
  }

  static setEmployeeId(employeeId : number) {
    sessionStorage.setItem('employeeId', employeeId);
  }

  static getEmployeeId() {
    return sessionStorage.getItem('employeeId');
  }

  static setVersionId(versionId : number) {
    sessionStorage.setItem('versionId', versionId);
  }

  static getVersionId() {
    return sessionStorage.getItem('versionId');
  }
}

module.exports=SessionStorage;
